﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/HomePage.Master" AutoEventWireup="true" CodeBehind="NewTicket.aspx.cs" Inherits="Web.Views.Common.NewTicket" %>
<%@ Register src="../Controls/SearchTransferTicket.ascx" tagname="SearchTransferTicket" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<title>添加转让火车票 - easydp.net|容易订票网</title>
<meta name="Author" content="容易订票网,容易订票,火车票价查询,火车票价格查询,全国火车票价查询,火车,火车票,票价,全国火车票价格查询,订票,网上订票,铁路新闻,路局,春运,提速" />
<meta name="Keywords" content="容易订票网,容易订票,火车票价查询,火车票价格查询,全国火车票价查询,火车,火车票,票价,全国火车票价格查询,订票,网上订票,铁路新闻,路局,春运,提速" />
<meta name="Description" content="容易订票网,容易订票,火车票价查询,火车票价格查询,全国火车票价查询,火车,火车票,票价,全国火车票价格查询,订票,网上订票,铁路新闻,路局,春运,提速" />
<link href="../../Content/style/TransferTicket.css" rel="stylesheet" type="text/css" />
<link href="../../Content/style/DateTime.css" rel="stylesheet" type="text/css" />
<script language="javascript">
    function to_blur() {
               if (Trim(_$('to').value) == "") {
                    _$('to_check').innerHTML = '<font style=color:#F00>请输入到达城市</font>';
                    return false;
                }
                else {
                    _$('to_check').innerHTML = '<font style=color:#004000>√</font>';
                    return true;
                }
    }

    function name_blur() {
                if (Trim(_$('name').value) == "") {
                    _$('name_check').innerHTML = '<font style=color:#F00>请输入联系人</font>';
                    return false;
                }
                else {
                    _$('name_check').innerHTML = '<font style=color:#004000>√</font>';
                    return true;
                }
    }


    function from_blur() {
                 if (Trim(_$('from_from').value) == "") {
                     _$('from_check').innerHTML = '<font  style=color:#F00>请输入出发城市</font>';
                     return false;
                }
                 else {
                    _$('from_check').innerHTML = '<font style=color:#004000>√</font>';
                    return true;
                }

    }
    function check_ticket_number(n) {
     
        if (checkInteger(n) == false) {
            _$('count_check').innerHTML = '<font style=color:#F00>请输入整数数量</font>';
            return false;

        }
        else if (n > 10) {
            _$('count_check').innerHTML = '<font style=color:#F00>输入数不能超过10张</font>';
            return false;
        }
        else {

            _$('count_check').innerHTML = '<font style=color:#004000>√</font>';
            return true;
        }

    }
  
    function mobile_onlick() {
        while (_$('mobile_check').childNodes.length > 0) {
            _$('mobile_check').removeChild(_$('mobile_check').childNodes[0]);
        }
        _$('mobile_check').style.position = "absolute";
        var d1 = document.createElement("DIV");
        d1.className = "tipsBox";
        var d2 = document.createElement("DIV");
        d2.className = "tips";
        var d3 = document.createElement("DIV");
        d3.className = "arrow";
        d2.appendChild(d3);
        var d4 = document.createElement("DIV");
        d4.className = "info";
        d4.innerHTML = "请按以下示例填写：<br />手机：13800000000<br />座机：028-88888888<br />或99999999";
        d2.appendChild(d4);
        d1.appendChild(d2);
        _$('mobile_check').appendChild(d1);
       
    }
    function mobile_blur(v) {
        _$('mobile_check').style.position = "";
        if (check_mobile_phone(Trim(v)) != false) {
            _$('mobile_check').innerHTML = '<font style=color:#004000>√</font>';
        }
        else {
            _$('mobile_check').innerHTML = '<font style="color:red">请输入正确电话格式</font>';
        }
    }
    var check_form_submit = function() {

        if (Trim(_$('name').value) == "") {
            _$('name').focus();
            _$('name_check').innerHTML = '<font style=color:#F00>请输入联系人</font>';

            return false;
        }
        if (Trim(_$('mobile').value) == "") {
            _$('mobile').focus();
            _$('mobile_check').innerHTML = '<font style=color:#F00>请输入正确电话格式</font>';
            return false;
        }
        if (!check_mobile_phone(Trim(_$('mobile').value))) {
            _$('mobile').focus();
            _$('mobile_check').innerHTML = '<font style=color:#F00>请输入正确电话格式</font>';
            return false;
        }

        if (_$('email').value == '') {
            _$('email').focus();
            _$('email_check').innerHTML = '<font style=color:#F00>请输入正确邮箱</font>';
            return false;
        }
        if (!checkEmail(_$('email').value)) {
            _$('email').focus();
            _$('email_check').innerHTML = '<font style=color:#F00>请输入正确邮箱</font>';
            return false;
        }


        if (Trim(_$('from_from').value) == "") {
            _$('from_from').focus();
            _$('from_check').innerHTML = '<font  style=color:#F00>请输入出发城市</font>';
            return false;
        }

        if (Trim(_$('to').value) == "") {
            _$('to').focus();
            _$('to_check').innerHTML = '<font style=color:#F00>请输入到达城市</font>';
            return false;
        }
        if (check_number() == false) {
            _$('number').focus();
            _$('number_check').innerHTML = '<font  style=color:#F00>请输入合法车次</font>';
            return false;
        }

        if (Trim(_$('type').value) == "") {
            _$('type').focus();
            return false;
        }
        if (Trim(_$('date').value) == "") {
            _$('date').focus();
            _$('ddddd').innerHTML = '<font style=color:#F00>请选择日期</font>';
            return false;
        }
        if (!checkInteger(Trim(_$('count').value))) {
            _$('count').focus();
            _$('count_check').innerHTML = '<font style=color:#F00>请输入整数数量</font>';
            return false;
        }
        if (!check_ticket_number(Trim(_$('count').value))) {
            return false;

        }

        //  club_notice_float.wait("提示", "请等候，正在提交...");
        // _$('publish').disabled = "disabled";
        //        alert(document.forms.length);
        //        alert(document.forms.item(0).action = );
        //        alert(_$("publish_form").action);
        //        _$('publish_form').submit();
        document.forms.item(0).action = "NewTicketSubmit.aspx";
        document.forms.item(0).submit();
    };

    ie4 = (document.all) ? true : false;
    ns4 = (document.layers) ? true : false;
    /*document.onkeydown=function keyDown(e){   

    if (ns4){   
    var Key=e.which;   
    }   
    
    else if (ie4){     
    var Key=event.keyCode;    
    }
    else
    {
    var Key=e.keyCode;   
    }
    if(Key==13&&document.activeElement.id=="count"){
    check_form_submit();
    } 
    }   
    */


    function check_date_change() {
        if (Trim(_$('date').value) != '') {
            _$('ddddd').innerHTML = '<font style="color:#004000">√</font>';
        } else {
            _$('ddddd').innerHTML = '<font style=color:#F00>请选择日期</font>';
        }
    }

    function checkEmail(strValue) {
        var regTextEmail = /^[\w-]+@[\w-]+(\.(\w)+)*(\.(\w){2,3})$/;
        return regTextEmail.test(strValue);
    }
    function checkInteger(number) {
        var integer_pattern = /^[0-9]{1,}$/;
        var re = integer_pattern.test(number);
        if (re == false) {
            return false;
        } else {
            if (number == 0) {
                return false;
            }
        }
        return true;
    }


    //检查车次
    function check_number() {
        var number_pattern = /^\w{1,4}$/;
        var re = number_pattern.test(Trim(_$('number').value));
        return re;

    }
    function check_mobile_phone(mobile_phone) {
        var phone_pattern = /^((0[1-9]{3})?(0[12][0-9])?[-])?\d{6,8}$/; 		//电话
        var mobile_pattern = /(^0?[1][358][0-9]{9}$)/; 						//移动电话
        phone_right = phone_pattern.test(mobile_phone);
        mobile_right = mobile_pattern.test(mobile_phone);
        all_right = phone_right || mobile_right;
        return all_right;
    }

    // 去掉字符串的尾空格（左空格）
    function LTrim(str) {
        var i;
        for (i = 0; i < str.length; i++) {
            if ((str.charAt(i) != " ") && (str.charAt(i) != "　")) break;
        }
        str = str.substring(i, str.length);
        return str;
    }

    // 去掉字符串的尾空格（右空格）
    function RTrim(str) {
        var i;
        for (i = str.length - 1; i >= 0; i--) {
            if ((str.charAt(i) != " ") && (str.charAt(i) != "　")) break;
        }
        str = str.substring(0, i + 1);
        return str;
    }

    // 去掉字符串的头尾空格（左右空格）
    function Trim(str) {
        return LTrim(RTrim(str));
    }

</script>
<script>

    function stripParen(str) {
        var s = str.indexOf('('); var e = str.indexOf(')');
        var r = str.substring(0, s) + str.substr(e + 1);
        return r;
    }

    function addEvent(obj, evType, fn) {
        if (obj.addEventListener) {
            obj.addEventListener(evType, fn, false);
            return true;
        } else if (obj.attachEvent) {
            var r = obj.attachEvent("on" + evType, fn);
            return r;
        } else {
            return false;
        }
    }

    function initSugg() {
        citySuggCore("from1", null, "../Controls/CI.aspx?ci=");
        citySuggCore("to_number1", null, "../Controls/CI.aspx?ci=");
        citySuggCore("from_from", null, "../Controls/CI.aspx?ci=");
        citySuggCore("to", null, "../Controls/CI.aspx?ci=");
       
    }
</script>
<script language="javascript" src="../../Content/JS/Suggest/city.js"></script>
<script language="javascript" src="../../Content/JS/Suggest/suggest.js"></script>
<script language="javascript" src="../../Content/JS/prototype.js"></script>
<script language="javascript" src="../../Content/JS/Scriptaculous/scriptaculous.js?load=effects"></script>
<script language="javascript" src="../../Content/JS/datatime.js"></script>
<%--<script language="javascript" src="../../Content/Prompt/ymPrompt.js"></script>--%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlace" runat="server">
<script language="javascript">
    window.onload = function() {
        document.getElementById("transfer_v").className = "curr-nav";
    }
</script>
  <div class="area">  
    <div class="col670">
    	<uc1:SearchTransferTicket ID="SearchTransferTicket1" runat="server" /><!-- end topBar -->
      
	<div class="blank5"></div>  
	  	  <div class="breadCrumb">
	  	<a href="TransferTicket.aspx" target="_blank">火车票转让首页</a>
	  	-&gt;发布消息
	  </div>
	  
	   	<div class="box638" >
          <h3>发布信息</h3>
        	<font style="color:#F00"></font>
          <form action="NewTicketSubmit.aspx" method="post" id="publish_form">
          <fieldset>
            <legend>联系人信息<span>(全部必填)</span></legend>
            <p>
              <label>联系人：</label>
              <input name="name" id="name" type="text" onblur="name_blur();" />
              <span id="name_check"></span>
            </p>
            <p>
              <label>电话：</label>
              <input name="mobile" id="mobile" type="text" onclick="mobile_onlick()" onblur="mobile_blur(this.value)"  />
              <span id="mobile_check" ></span>
            </p>
            
            <p>
              <label>邮箱：</label>
              <input name="email" id="email" type="text" title="E-mail一经提供,不可修改 请填写真实的E-mail,供删除使用" onblur="if(checkEmail(Trim(this.value))!=false){_$('email_check').innerHTML='<font style=color:#004000>√</font>'}else{_$('email_check').innerHTML='<font style=color:#F00>请输入正确邮箱</font>'}" />
              <span id="email_check">删除信息时使用</span>
            </p>
            
            <legend>车票信息<span>(全部必填)</span></legend>
            
            <p>
              <label>出发城市：</label>
              <input name="newfrom" id="from_from" type="text" onblur="from_blur();" />
              <span id="from_check"></span>
            </p>
            <p>
              <label>到达城市：</label>
              <input name="to" id="to" type="text" onblur="to_blur();"  />
              <span id="to_check"></span>
            </p>
            <p>
              <label>车次：</label>
              <input name="number" id="number" type="text" onblur="if(check_number()!=false){_$('number_check').innerHTML='<font style=color:#004000>√</font>';}else{_$('number_check').innerHTML='<font  style=color:#F00>请输入合法车次</font>';}"  />
              <span id="number_check"></span>
            </p>
            
            <p>
              <label>车票类型：</label>
              <span class="radio"><input name="type" style="width:16px;" id="type" type="radio" value="站票"  /><span>站票</span></span>
              <span class="radio"><input name="type" style="width:16px;" id="type" type="radio" value="硬座" checked /><span>硬座</span></span>

              <span class="radio"><input name="type" style="width:16px;" id="type" type="radio" value="软座" /><span>软座</span></span>
              <span class="radio"><input name="type" style="width:16px;" id="type" type="radio" value="硬卧"  /><span>硬卧</span></span>
              <span class="radio"><input name="type" style="width:16px;" id="type" type="radio" value="软卧" /><span>软卧</span></span>
            </p>
            <p>
              <label>发车日期：</label>
              <input name="date" id="date" type="text"  readonly="readonly"   onblur="showHint(this,0)" onfocus="showHint(this,10,'outDate')"  />
                <span id="ddddd" >&nbsp;</span>
            </p>
            <p>
              <label>数量：</label>
              <input name="count" id="count" type="text" onfocus="check_date_change();"  onblur="check_ticket_number(this.value)"  />&nbsp;张
              <span id="count_check"></span>
              <input type="hidden" name="zoneid" value="1">
            </p>
            <p>
                 <label>学生票：</label>
                <input type="checkbox" id="IsCHD" name="IsCHD" style="border:0px; width:20px" />
            </p>
            <p><input name="publish" id="publish" type="button" class="btn131" value="发布信息" onclick="check_form_submit()" /></p>
          </fieldset>
        </form>
        </div><!-- end box638 -->
	  </div>
	  
  
<div class="col270">
<script type="text/javascript" src="http://mat1.qq.com/www/js/swfobjectopt.js"></script>
<style>
.flashViews{width:204px; height:426px; border:1px solid #2b4f43}
</style>
<div id='fviews' class="flashViews" align="center">
<script type="text/javascript">
    var sofocus = new SWFObject("http://mat1.qq.com/news/09512/dsj512/dashijimainList.swf", "flash_focus", "100%", "100%", "9.0.28", "#FFFFFF");
    sofocus.addParam("allowNetworking", "all");
    sofocus.addParam("allowScriptAccess", "always");
    sofocus.addParam("allowFullScreen", "true");
    sofocus.addParam("scale", "noscale");
    sofocus.addParam("wmode", "transparent");
    //标题内容。用"|"分割。
    sofocus.addVariable("titlestr", "14：28分，四川汶川发生8.0级大地震，多地有震感。16：40分，温总理飞赴灾区指挥救灾。当日确认死亡8533人。|救灾直升机失事；唐家山堰塞湖抢险成功；确认69181人遇难18522人失踪。全国共接收各界捐赠款物总计467.43亿元。|确认69207人遇难18194人失踪；灾区考生参加延期高考；四川八成规模以上工业企业恢复生产。|确认死亡69181人遇难18522人失踪；30日青川发生6.1级地震，专家赴青川调查；百日大祭。|灾区中小学全部复课；确认69227人遇难；地震后已发生8次6级以上强余震；北川老县城被泥石流掩埋。| 灾区精神疾病高发，首例地震伤员罗桂琼跳楼自杀；灾区最后一批救灾部队完成救灾任务回撤。|灾区最后一条“生命通道”抢通；最后一位地震小伤员出院；遇难同胞半周年祭；北川异地重建选址基本确定。|灾后农房重建进入高峰期；北川出现2000多个单亲家庭，重组婚姻面临困难；审计发现抗震救灾款物管理使用存在六大问题。|500多灾区妇女成功再孕；损毁公路全抢通；温总理视察灾区，与灾民在板房过春节。|成都新建7个地震台；首个震后再生育宝宝诞生；北川新县城征地拆迁工作启动；北京万余就业岗位信息提供给灾区。|地震实物将迁入汶川大地震博物馆；中国银行将提供3000亿贷款促进四川灾后重建 ；因地震失业人员已有80％重新就业。|北川老县城开禁四天，两万群众进入北川祭奠亲人；灾区推出“感恩旅游”计划。|汶川大地震一周年，灾区再次成为媒体关注焦点。汶川县举办11项纪念活动。");
    //点击的URL。用"|"分割。
    sofocus.addVariable("clickstr", "http://news.qq.com/zt/2009/512dsj/0512.htm|http://news.qq.com/zt/2009/512dsj/604.htm|http://news.qq.com/zt/2009/512dsj/703.htm|http://news.qq.com/zt/2009/512dsj/805.htm|http://news.qq.com/zt/2009/512dsj/924.htm|http://news.qq.com/zt/2009/512dsj/1003.htm|http://news.qq.com/zt/2009/512dsj/1112.htm|http://news.qq.com/zt/2009/512dsj/1220.htm|http://news.qq.com/zt/2009/512dsj/0124.htm|http://news.qq.com/zt/2009/512dsj/092.htm|http://news.qq.com/zt/2009/512dsj/093.htm|http://news.qq.com/zt/2009/512dsj/405.htm");
    //悬停的秒数
    sofocus.addVariable("secstr", "3");
    sofocus.write("fviews");
    // ]]> 
 </script><!--[if !IE]>|xGv00|83dbc900ae5d8d1cbe11e71bd470cb2f<![endif]--></div>
    </div>
	  </div>
</asp:Content>
